﻿<Page x:Class="Microsoft.NodejsTools.Project.ImportWizard.SaveProjectPage"
      x:ClassModifier="internal"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:l="clr-namespace:Microsoft.NodejsTools.Project.ImportWizard"
      xmlns:wpf="clr-namespace:Microsoft.VisualStudioTools.Wpf"
      mc:Ignorable="d" 
      d:DesignHeight="300" d:DesignWidth="500"
      Title="Save Project"
      FocusManager.FocusedElement="{Binding ElementName=ProjectPathTextBox}">

    <Page.Resources>
        <ResourceDictionary Source="ImportWizardDictionary.xaml" />
    </Page.Resources>
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition />
        </Grid.RowDefinitions>
        
        <wpf:LabelledControl Title="Select where to save your project file."
                           HelpText="We won't move any files, and you can use Save As to move the project file later."
                           Grid.Row="0">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="auto"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="auto" />
                </Grid.RowDefinitions>
                <TextBox Grid.Column="0" Text="{Binding Path=ProjectPath,Mode=TwoWay}" Name="ProjectPathTextBox" />
                <Button Grid.Column="1" Style="{StaticResource BrowseSaveFileButton}"
                        CommandParameter="Node.js Project Files (*.njsproj)|*.njsproj|All Files (*.*)|*.*"
                        CommandTarget="{Binding ElementName=ProjectPathTextBox}" />
            </Grid>
        </wpf:LabelledControl>
    </Grid>
</Page>
